<?php

CHtml::$afterRequiredLabel = '';
$form = $this->beginWidget('CActiveForm', array(
	'errorMessageCssClass' => 'error',
	'id' => 'item-form',
	'enableAjaxValidation' => false,
	'htmlOptions' => array(
		'class' => 'nice',
		'method' => 'POST',
		'enctype' => 'multipart/form-data',
	)
	));

echo $form->labelEx($model, 'name');
echo $form->textField($model, 'name', array(
	'class' => 'input-text',
	'size' => 32,
	'maxlength' => 32,
	'placeholder' => 'Name',
	'required' => '',
));
echo $form->error($model, 'name');

echo $form->labelEx($model, 'quantity');
echo $form->textField($model, 'quantity', array(
	'class' => 'input-text',
	'size' => 10,
	'maxlength' => 10,
	'placeholder' => 'Quantity',
	'required' => '',
));
echo $form->error($model, 'quantity');

echo $form->labelEx($model, 'price');
echo $form->textField($model, 'price', array(
	'class' => 'input-text',
	'placeholder' => 'Price',
	'required' => '',
));
echo $form->error($model, 'price');

echo $form->labelEx($model, 'description');
echo $form->textArea($model, 'description', array(
	'class' => 'input-text',
	'rows' => 6,
	'maxlength' => 256,
	'placeholder' => 'Description'
));
echo $form->error($model, 'description');

echo $form->labelEx($model, 'image');
echo $form->fileField($model, 'image', array(
	'class' => 'input-text',
));
echo $form->error($model, 'image');

echo CHtml::submitButton($model->isNewRecord ? 'Create New Item' : 'Update Item Details', array(
	'class' => 'nice blue radius button'
));

$this->endWidget();
?>
